﻿using KouDai.Core.Service.Navigation;

namespace KouDai.Core.ViewModel
{
    public class ViewModelLocator
    {
        public INavigateService NavigateService { private get; set; }

        static ViewModelLocator()
        {

        }

        #region Fields
        private MainViewModel _main;
        private ItemDetailViewModel _itemDetail;
        private ImageWallItemsViewModel _imageWall;
        #endregion


        #region Properties
        public MainViewModel Main
        {
            get
            {
                if (_main == null)
                {
                    _main = new MainViewModel(NavigateService);
                }
                return _main;
            }
        }

        public ItemDetailViewModel ItemDetail
        {
            get
            {
                if (_itemDetail == null)
                {
                    _itemDetail = new ItemDetailViewModel(NavigateService);
                }
                return _itemDetail;
            }
        }

        public ImageWallItemsViewModel ImageWallContext
        {
            get
            {
                if (_imageWall == null)
                {
                    _imageWall = new ImageWallItemsViewModel(NavigateService);
                }
                return _imageWall;
            }
        }
        #endregion
      
    }
}
